package com.integrationpath.mengine.webapp.comparator;

import org.displaytag.model.DefaultComparator;

public class FeatureComparator extends DefaultComparator {
	
	/**
     * Compares two given objects. Not comparable objects are compared using their string representation. String
     * comparisons are done using a Collator.
     * @param object1 first parameter
     * @param object2 second parameter
     * @return the value
     */
    public int compare(Object object1, Object object2)
    {
        int returnValue = 0;
        
        if (object1 instanceof String && object2 instanceof String)
        {
            returnValue = (((String)object1).contains("UNFEATURED") && ((String)object1).contains("UNFEATURED"))?-1:1;
        }
        return returnValue;
    }


}
